<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title></title>
    <meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="<c:url value="/css/application.css"></c:url>">
    <link rel="stylesheet" type="text/css" href="<c:url value="/css/form.css"></c:url>">
    <link rel="stylesheet" type="text/css" href="<c:url value="/css/shop_main.css" />">

    <script type="text/javascript">

        function logout() 
        {
			if(confirm("您真的要离开当当网吗?")) 
			{
				location.href="<c:url value="/customer?act=logout"/>";
			}
	    }
         
	     function validate_required(field,alerttxt)
         {
              with (field)
              {
                  if (value==null||value=="")
                     {
                      alert(alerttxt);return false}
                      else {return true}
               }
         }    
         
         function validate_form(thisform)
         {
              with (thisform)
              {
                   if (validate_required(customerid,"ID不能为空!")==false)
                      {receiver.focus();return false}
                   if (validate_required(customerpwd,"密码不能为空!")==false)
                      {receiver_add.focus();return false}        
              }
         }
    </script>
  </head>
  
  <body>
  <div  id="allcontent">
    <form action="<c:url value="/customer"/>" method="post" onsubmit="return validate_form(this)">
        <input type="hidden" name="act" value="login" />
        <div style="float:left">
            <img alt="" src="<c:url value="/pics/front/login_img.gif" />" >
        </div>
        <div  style="border:2px solid gray;float:left;margin-right:60px;margin-top:80px;
                     padding-top:30px;padding-bottom:30px;padding-left:30px;padding-right:30px;
                     font-size:;">
                     
                    <span class="lableFont">会员账号:</span>
                    <br/>
	                <input type="text" class="text" name="customerid" size="20" value="${param['customerid']}"/>
                    <br/>                
                    <span class="lableFont">登陆密码:</span>
	                <br/>
	                <input type="text" class="text" name="customerpwd" size="20" value="${param['customerpwd']}"/>
	                <br/>
                   <c:if test="${not empty errMsg}">
		               <div id="operErr" style="color: red;">
		              	${errMsg}
	                </div>
	               </c:if>
                        <c:remove var="errMsg"/>  
                      <br/>
                    <input type="submit" value="登录"/>
                    <a href="<c:url value="customer?act=input_customer" />">免费注册</a>
        </div>
        
    </form>
  </div>  
  </body>
</html>
